package ch.sfug.log.output {
	import flash.text.TextField;
	
	import ch.sfug.log.output.ILoggerOutput;	

	/**
	 * @author loop
	 */
	public class LogTextfield implements ILoggerOutput {

		private var txtfield:TextField;

		/**
		 * creates a logger class that can be used as output in the Logger class
		 */
		public function LogTextfield( txtfield:TextField ) {
			this.txtfield = txtfield;
		}

		
		public function append(txt:String):void {
			this.txtfield.text = txt + "\n" + this.txtfield.text;
		}

		
		public function clear():void {
			this.txtfield.text = "";
		}
	}
}
